﻿//TODO: implement and Test, WangBrady

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Drawing;
using System.Drawing.Imaging;

namespace LowLevelGraphics.Filter
{
    /// <summary>
    /// A popular corner detector designed for 
    /// motion estimation was proposed by Wang and Brady.  
    /// They applied differential geometry operators to detect corners 
    /// based on the measurement of surface curvature, but derived 
    /// a simplified cornerness measure suitable for real-time 
    /// applications while improving performance relative to the 
    /// Kitchen and Rosenfeld operator.
     /// </summary>
    public class WangBrady : BaseImageFilter, ICornerFinder
    {
        protected List<Point> m_aPoint = new List<Point>();
        /// <summary>
        /// Default constructor
        /// </summary>
        public WangBrady()
        {
        }

        /// <summary>
        /// used by clone to create a deep copy
        /// </summary>
        /// <param name="_wangBrady"></param>
        internal WangBrady(WangBrady _wangBrady)
        {
        }

        /// <summary>
        /// Gets the points
        /// </summary>
        public List<Point> Points
        {
            get { return m_aPoint; }
        }

        /// <summary>
        /// Executes this filter
        /// </summary>
        /// <param name="_bitmap"></param>
        /// <returns></returns>
        public override UnsafeBitmap Execute(UnsafeBitmap _bitmap)
        {

            return _bitmap;
        }

        /// <summary>
        /// create a deep copy
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            return new WangBrady(this);
        }
    }
}
